package com.mall.wechat.service.impl;

import com.mall.wechat.mapper.WxUserMapper;
import com.mall.wechat.model.Vo.WxUserVo;
import com.mall.wechat.model.dto.WxUserDto;
import com.mall.wechat.service.IWxUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class WxUserServiceImpl implements IWxUserService {

    @Resource
    private WxUserMapper wxUserMapper;

    @Override
    public WxUserVo selectWxUserById(Long id) {
        return wxUserMapper.selectWxUserById(id);
    }

    @Override
    public WxUserVo selectWxUserByOpenId(String openId) {
        return wxUserMapper.selectWxUserByOpenId(openId);
    }

    @Override
    public int insertWxUser(WxUserDto wxUserDto) {
        return wxUserMapper.insertWxUser(wxUserDto);
    }

    @Override
    public int updateWxUser(WxUserDto wxUserDto) {
        return wxUserMapper.updateWxUser(wxUserDto);
    }

    @Override
    public int deleteWxUserById(Long id) {
        return wxUserMapper.deleteWxUserById(id);
    }
}
